
// 动态列表
export const trendsList = (data) =>
  uni.http({
    url: 'api/trends/lst',
    method: 'post',
    data,
    requestType: 'baby',
  })
// 获取用户信息
export const getUserInfoApi = (data) =>
  uni.http({
    url: 'bb/user/get_user_info',
    method: 'get',
    data,
    requestType: 'baby',
  })
// 获取用户信息-新
export const getUserStatusApi = (data) =>
  uni.http({
    url: 'nx/MenstrualRecord/get_user_status',
    method: 'get',
    data,
    requestType: 'baby',
  })
// 孕产期
export const editExpectedDateApi = (data) =>
  uni.http({
    url: 'bb/user/expected_date_childbirth_change',
    method: 'post',
    data,
    requestType: 'baby',
  })
// 删除动态
export const delPostApi = (data) =>
  uni.http({
    url: 'bb/user/my_post_delete',
    data,
    requestType: 'baby',
  })
  
export const getPic = (data) =>
  uni.http({
    url: 'api/media/video_img',
    method: 'post',
    data,
    requestType: 'baby',
  })
// 首页搜索
export const getSearchListApi = (data) =>
  uni.http({
    url: 'bb/post/searchList',
    method: 'get',
    data,
    requestType: 'baby',
    header: {
      platform: 'baby',
    },
  })
// 获取科普热门列表
export const getPopularListApi = (data) =>
  uni.http({
    url: 'bb/popular_science/list',
    method: 'get',
    data,
    requestType: 'baby',
  })
// 记经期、备孕期、怀孕期获取周期列表
export const pregnancyChangeCycleList = (data) =>
  uni.http({
    url: 'bb/pregnancy_change/cycleList',
    method: 'get',
    data,
    requestType: 'baby',
  })
// 经期科普文章
export const popularScienceArticles = (data) =>
  uni.http({
    url: 'bb/PopularScience/articles',
    method: 'get',
    data,
    requestType: 'baby',
  })
// 女性科普文章
export const popularScienceArticlesList = (data) =>
  uni.http({
    url: 'bb/PopularScience/articlesList',
    method: 'get',
    data,
    requestType: 'baby',
  })
// 获取首页经期列表
export const getPeriodListApi = (data) =>
  uni.http({
    url: 'bb/PopularScience/get_user_status',
    method: 'get',
    data,
    requestType: 'baby',
  })
// 获取孕周和对应内容
export const pregnancyChangeGestationAge = (data) =>
  uni.http({
    url: 'bb/pregnancy_change/gestationAge',
    method: 'get',
    data,
    requestType: 'baby',
  })
// 根据孕周获取各孕周的注意事项及变化
export const pregnancyChangeGestationAgeChange = (data) =>
  uni.http({
    url: '/bb/pregnancy_change/gestationAgeChange',
    method: 'get',
    data,
    requestType: 'baby',
  })
// 经期与备孕获取当日的文章
export const popularScienceMenstrualArticles = (data) =>
  uni.http({
    url: 'bb/PopularScience/menstrualArticles',
    method: 'get',
    data,
    requestType: 'baby',
  })
// 获取推荐 || 动态列表
export const getBottomListApi = (data) =>
  uni.http({
    url: 'bb/post/first_post',
    method: 'get',
    data,
    requestType: 'baby',
  })
// 切换宝宝
export const getDefaultBaby = (data) =>
  uni.http({
    url: 'bb/baby/default_baby',
    method: 'get',
    data,
    requestType: 'baby',
  })

// 直播列表
export const getLiveMyApi = (data) =>
  uni.http({
    url: 'sq/liveRoom/pageList',
    method: 'get',
    data,
    header: {
      platform: 'baby',
    },
    requestType: 'baby',
  })

// 孕期记录列表
export const PregnancyRecordsList = (data) =>
  uni.http({
    url: 'bb/user/my_post',
    method: 'post',
    data,
    requestType: 'baby',
  })

// 发布孕期记录
export const publishPregnancyRecords = (data) =>
  uni.http({
    url: '/bb/user/send_post',
    method: 'post',
    data,
    requestType: 'baby',
  })
// 孕期记录详情
export const recordDetail = (data) =>
  uni.http({
    url: 'bb/PregnancyRecords/info',
    method: 'get',
    data,
    requestType: 'baby',
  })
//经期日历保存
export const setRecord = (data) =>
  uni.http({
    url: 'nx/MenstrualRecord/set_menstrual_record',
    method: 'post',
    data,
    requestType: 'baby',
  })

// 用户切换状态
export const switchStatusApi = (data) =>
  uni.http({
    url: 'nx/MenstrualRecord/modifying_information',
    method: 'post',
    data,
    requestType: 'baby',
  })

//预产期计算
export const pregnantTime = (data) =>
  uni.http({
    url: 'bb/PopularScience/pregnant_time',
    method: 'post',
    data,
    requestType: 'baby',
  })

// 删除宝宝
export const deleteBabyApi = (data) =>
  uni.http({
    url: 'bb/baby/del',
    method: 'get',
    data,
    requestType: 'baby',
  })

// 添加宝宝信息
export const addBabyListApi = (data) =>
  uni.http({
//  url: 'bb/baby/baby_edit',
    url: 'nx/baby/baby_edit ',
    method: 'post',
    data,
    requestType: 'baby',
  })

// 宝宝信息
export const getBabyListApi = (data) =>
  uni.http({
//  url: 'bb/baby/baby_list',
    url: 'nx/baby/baby_list ',
    method: 'post',
    data,
    requestType: 'baby',
  })

// 获取宝贝详情
export const getBabyMonthInfoApi = (data) =>
  uni.http({
    url: 'bb/post/parenting',
    method: 'get',
    data,
    requestType: 'baby',
  })
// 获取经期科普详情
export const getBabyMonthInfoApiKp = (data) =>
  uni.http({
    url: 'bb/PopularScience/menstrualArticlesInfo',
    method: 'get',
    data,
    requestType: 'baby',
  })

// 孕期变化
export const pregnancyChangeApi = (data) =>
  uni.http({
    url: 'bb/pregnancy_change/list',
    method: 'post',
    data,
    requestType: 'baby',
  })
// 所有周变化
export const weekChangeListApi = (data) =>
  uni.http({
    url: 'bb/pregnancy_change/week_change_list',
    method: 'get',
    data,
    requestType: 'baby',
  })

// 周变化详情
export const weekChangeDetails = (data) =>
  uni.http({
    url: 'bb/pregnancy_change/get_week_info',
    method: 'post',
    data,
    requestType: 'baby',
  })
export const recordSetting = (data) =>
  uni.http({
    url: 'bb/user/user_period_record_setting',
    method: 'get',
    data,
    requestType: 'baby',
  })
// 科普列表
export const popularScienceListApi = (data) =>
  uni.http({
    url: 'bb/popular_science/list',
    method: 'get',
    data,
    requestType: 'baby',
  })

export const periodRecord = (data) =>
  uni.http({
//  url: 'bb/user/user_period_record',
		url:'/nx/MenstrualRecord/menstrual_record',
    method: 'get',
    data,
    requestType: 'baby',
  })

export const calculator = (data) =>
  uni.http({
    url: 'bb/user/calculator',
    method: 'post',
    data,
    requestType: 'baby',
  })

export const preparationPregnancy = (data) =>
  uni.http({
    url: 'bb/post/get_preparation_pregnancy',
    method: 'get',
    requestType: 'baby',
  })
export const getPeriodList = (data) =>
  uni.http({
    url: 'bb/post/preparation_pregnancy_article',
    method: 'get',
    data,
    requestType: 'baby',
  })

// 科普详情
export const coupeDetails = (data) =>
  uni.http({
    url: 'bb/popular_science/get_info',
    method: 'post',
    data,
    requestType: 'baby',
  })
// 举报
export const applyReport = (data) =>
  uni.http({
    url: 'api/report/apply_report',
    method: 'post',
    data,
    requestType: 'baby',
  })

// 科普收藏
export function collectPopularApi(data) {
  return uni.http({
    url: 'bb/user/collectoutkp',
    method: 'get',
    data,
    requestType: 'baby',
  })
}
// 科普取消收藏
export function cancelCollectPopularApi(data) {
  return uni.http({
    url: 'bb/user/collectout',
    method: 'get',
    data,
    requestType: 'baby',
  })
}

// 广场/经验-贴子列表
export const getListApi = (data) =>
  uni.http({
    url: 'bb/post/list',
    method: 'get',
    data,
    requestType: 'baby',
  })
// 删除我的评论
export const delComment = (data) =>
  uni.http({
    url: '/bb/user/del_comment',
    method: 'get',
    data,
    requestType: 'baby',
  })
// 收藏贴子
export const socialTopicCollect = (data) =>
  uni.http({
    url: 'blapp/v1/social_topic/collect',
    method: 'get',
    data,
    requestType: 'baby',
  })

// 删除贴子
export const userDelPost = (data) =>
  uni.http({
    url: '/bb/user/del_post',
    method: 'get',
    data,
    requestType: 'baby',
  })
// 查看贴子详情
export const getInfoApi = (data) =>
  uni.http({
    url: 'bb/post/post_info',
    method: 'post',
    data,
    requestType: 'baby',
  })

// 贴子-点赞
export const postZanApi = (data) =>
  uni.http({
    url: 'bb/user/post_zan',
    method: 'post',
    data,
    requestType: 'baby',
  })

// 贴子-评论
export const sendCommentApi = (data) =>
  uni.http({
    url: 'bb/user/send_comment',
    method: 'post',
    data,
    requestType: 'baby',
  })

// 点赞评论
export const zanCommentApi = (data) =>
  uni.http({
    url: 'bb/user/comment_zan',
    method: 'post',
    data,
    requestType: 'baby',
  })

// 追加评论
export const addCommentApi = (data) =>
  uni.http({
    url: 'bb/user/comment_send',
    method: 'post',
    data,
    requestType: 'baby',
  })

export const checkMsg = (data) =>
  uni.http({
    url: 'api/common/examine_text_to_tx',
    method: 'get',
    data,
    requestType: 'baby',
  })
